export default class Button {
constructor () {
  this.plugin = {
    name: 'dg-lab-play-plugin',
    dsc: '郊狼插件',
    priority: 99,
    rule: [
      {
        reg: /^#?(dg|郊狼)(帮助|help|菜单)$/i,
        fnc: 'dglab',
      },
      {
        reg: /^#?(dg|郊狼)(打开|添加|增加|启动)(ws)?(连|莲|链)接/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)(\d+)?((增加|增大|提高|提升|\+)|(减少|减小|-))?(通道)?(a|b)(强度|大小)?\s*(\d+)$/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)(断开|关闭)(ws)?(连|莲|链)接\s*(\d+)$/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)(设备)?列表$/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)?(\d+)?(一键起爆|一键爽飞|一键开火|一键0721|0721)\s*(\d+)?/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)波形(列表|队列)$/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)查看波形\s*(.*)/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)(\d+)?设置(通道)?(a|b|ab)?波形\s*([^\s]+|\d+)(?:\s*([^\s]+|\d+))?\s*(?:时间(\d+))?(?:\s*(?:时间(\d+)))?/i,
        fnc: 'dglab'
      },
      {
        reg: /^#?(dg|郊狼)(导入|解析)波形/,
        fnc: 'dglab'
      }
      ]
    }
  }

dglab (e) {
  const button = [
    { label: '启动', data: '#dg添加ws连接' },
    { label: '断开', data: '#dg断开ws连接' },
    { label: '设备列表', data: '#dg列表' },

    { label: '增大强度', data: '#dgn+a1' },
    { label: '减小强度', data: '#dgn-a1' },
    { label: '一键起爆', data: '#n一键起爆' },

    { label: '查看波形', data: '#dg查看波形' },
    { label: '导入波形', data: '#dg导入波形*' },
    { label: '设置波形', data: '#dg设置n波形**时间' },
    ]
    return Bot.Button(button, 3)
  }
}
